<?php

namespace App\Services;

use App\Models\Customer;
use Slowlyo\OwlAdmin\Services\AdminService;

/**
 * 客户IP管理
 *
 * @method Customer getModel()
 * @method Customer|\Illuminate\Database\Query\Builder query()
 */
class CustomerService extends AdminService
{
	protected string $modelName = Customer::class;
	public function listQuery()
	{
		return parent::listQuery()->with([
			'operator:id,name',
			'company:id,company_name',
			'customer_bus:id,name',
			'idcnode:id,idc_name',
			'fcustomer:id,short_name'
		]);
	}
	

	public function getData($fcustomer_id)
	{
		return $this->listQuery()->where('fcustomer_id', $fcustomer_id)->get();
	}
}